﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchControl.ascx.cs" Inherits="SearchControl" %>
<script type="text/javascript" language="javascript" src='<%=ResolveUrl("~/src/jquery.js") %>'></script>
<script type="text/javascript" language="javascript" src='<%=ResolveUrl("~/src/bgiframe.js") %>'></script>
<script type="text/javascript" language="javascript" src='<%=ResolveUrl("~/src/weebox.js") %>'></script>
<link type="text/css" rel="Stylesheet" href='<%=ResolveUrl("~/src/weebox.css") %>' />
<link type="text/css" rel="Stylesheet" href='<%=ResolveUrl("~/Css/nmain.css") %>' />

<script language=javascript type="text/javascript">
$(document).ready(function(){
  $(".changeClass").click(function(){
     var applyid=$(this).attr("name");
	 $.weeboxs.open('#boxcontent', {
          title:'选择调整年月：',
          onok:function()
          {
             var m=$('#EffectDateMonth').val();
             var y=$('#EffectDateYear').val();
               
            window.open("LoadChangeApply.aspx?applyid="+applyid+"&thetype=change&effectdate="+y+m);
            //box.close();//增加事件方法后需手动关闭弹窗
    	    }
          });
     }
  );
}); 
</script>
<div style="display:none" id="boxcontent">
    调整年月：&nbsp;<select name="EffectDateYear" id="EffectDateYear">
	<option value="2009">2009</option>
	<option value="2010">2010</option>
	<option value="2011">2011</option>

</select>年
    <select name="EffectDateMonth" id="EffectDateMonth">  
        <option value="02">2</option>
	    <option value="03">3</option>
	    <option value="04">4</option>
	    <option value="05">5</option>
	    <option value="06">6</option>
	    <option value="07">7</option>
	    <option value="08">8</option>
	    <option value="09">9</option>
	    <option value="10">10</option>
	    <option value="11">11</option>
	    <option value="12">12</option>
</select>月</div>
<table style="font-size:12px;" align="center">
    <tr>
        <td align="center" bgcolor="#D7F3FF" height="25" style="width: 810px">
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr align="left">
                    <td height="32" width="73"><img src="../Images/Main_13.jpg" width="73" height="30"/></td>
                    <td width="65">关键字：</td>
                    <td width="180">
                        <asp:TextBox ID="txbcontent" runat="server"></asp:TextBox></td>
                    <td style="width:75px">搜索范围：</td>
                    <td style="width: 55px">
                        <asp:DropDownList ID="ddlsearch" runat="server">
                            <asp:ListItem>编号</asp:ListItem>
                            <asp:ListItem>姓名</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td><asp:Button ID="btnsearch" runat="server" Text="搜索" OnClick="btnsearch_Click" /></td>
                    <td runat="server" id="td_street" style="display:none;">
                        街道选择：
                         <asp:DropDownList ID="ddlstreet" runat="server" AutoPostBack="True" Font-Size="12px" OnSelectedIndexChanged="ddlstreet_SelectedIndexChanged">
                            <asp:ListItem Selected="True" Value="%">海曙</asp:ListItem>
                            <asp:ListItem Value="江厦">江厦</asp:ListItem>
                            <asp:ListItem>月湖</asp:ListItem>
                            <asp:ListItem>南门</asp:ListItem>
                            <asp:ListItem>鼓楼</asp:ListItem>
                            <asp:ListItem>西门</asp:ListItem>
                            <asp:ListItem>白云</asp:ListItem>
                            <asp:ListItem>望春</asp:ListItem>
                            <asp:ListItem>段塘</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td style="width: 810px">
            <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="80" colspan="1" align="center" class="lanse" style="width: 80px; height: 14px"></td>
              <td align="center" class="lanse" colspan="3" style="height: 14px"> 本页共有
                <asp:Label ID="lblPageInfo" runat="server"></asp:Label>
                条 &nbsp;</td>
              <td class="lanse" width="190" style="height: 14px"><span class="lanse" style="height: 14px">显示年月
                <select name="EffectDateYear2" id="Select1" runat="server">
                  <option value="2009">2009</option>
                  <option value="2010">2010</option>
                  <option value="2011">2011</option>
                </select>
                  &nbsp;
                  <asp:DropDownList ID="ddlMonth" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlMonth_SelectedIndexChanged">
                  </asp:DropDownList></span></td>
              <td class="lanse" width="207" style="height: 14px">
                     <!-- OnClick="Button1_Click" Text="生成该月清册" -->&nbsp;暂停生成
                 </td>
            </tr>
          </table>
        </td>
    </tr>
    <tr>
        <td style="width: 810px">
            <asp:GridView ID="gvstreetshow" AllowPaging="true" PagerSettings-Position="Bottom" PageSize="20" runat="server" AutoGenerateColumns="False" CssClass="GridViewStyle" Width="100%" OnRowCommand="gvstreetshow_RowCommand" OnRowDataBound="gvstreetshow_RowDataBound" EmptyDataText="<font style='font-size:13px'><strong>暂时没有符合条件的信息</strong></font>" OnPageIndexChanging="gvstreetshow_PageIndexChanging" >
                    <Columns>
                        <asp:TemplateField HeaderText="受理编号">
                            <ItemTemplate>
                              <%#Eval("adm_noid")%>  长编号：<%#Eval("applongid")%>
                            </ItemTemplate>
                            <ItemStyle Width="30%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="详情">
                            <ItemTemplate>
                                申请人：<%#Eval("applyname")%>
                            </ItemTemplate>
                            <ItemStyle Width="20%" />
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="年月">
                            <ItemTemplate>
                             <%#Eval("EffectDate")%></ItemTemplate>
                            <ItemStyle Width="10%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlkview" runat="server" Target="_blank" NavigateUrl='<%# "../StreetCenter/ViewAdmissibility.aspx?id="+Eval("adm_id") %>' Font-Size="14px">受理单</asp:HyperLink>
                                <asp:HyperLink ID="hlkadd" runat="server" Target="_blank"  NavigateUrl='<%#Convert.ToInt32(Eval("adm_applyed").ToString())==0? "../StreetCenter/AddApply.aspx?id="+Eval("adm_noid"):"../StreetCenter/AddApply.aspx?applyid="+Eval("id")+"&thetype=view"%>' Font-Size="14px"><%#Convert.ToInt32(Eval("adm_applyed").ToString())==0?"填写申请表":"查看申请表"%></asp:HyperLink>
                             <asp:LinkButton ID="lkbsubmit" runat="server" Enabled='<%# AllowView(Convert.ToInt32(Eval("adm_noid")),Eval("id")) %>' CommandName="commit" CommandArgument='<%#Eval("id") %>' Font-Size="14px">提交</asp:LinkButton>
			                   <%--    <asp:LinkButton ID="lkbQuicksubmit" runat="server"   Enabled='<%# AllowView(Convert.ToInt32(Eval("adm_noid")),Eval("id")) %>'   CommandName="quickcommit" CommandArgument='<%#Eval("adm_noid") %>' Font-Size="14px">快速提交</asp:LinkButton>--%>
                                <%--<asp:LinkButton ID="lkbtndel" runat="server"  CommandName="del" CommandArgument='<%#Eval("adm_id") %>' Font-Size="14px">删除</asp:LinkButton>--%>
                                <!--a href='<%# "../StreetCenter/AddApply.aspx?applyid="+Eval("id") %>&thetype=edit' target="_blank"  Font-Size="14px">校对</a-->
                                <a   class='changeClass' name="<%#Eval("id") %>" style=" font-size:14px;">调整</a>
                              
                            </ItemTemplate>
                            <ItemStyle Width="40%" />
                        </asp:TemplateField>
                    </Columns>
                    <PagerTemplate>
                        <span style="padding-right:10px;">共找到&nbsp;<asp:Label ID="lbl_TotalCount" runat="server" ForeColor="red"></asp:Label>&nbsp;条符合条件的数据</span>
                    当前第<asp:Label ID="Lb_cur" runat="server" ForeColor="Red" Text ="<%# ((GridView)Container.NamingContainer).PageIndex + 1 %>">
                        </asp:Label>页<span style="font-size: 12pt">/</span>共<asp:Label ID="Lb_count" runat="server" ForeColor="Red" text="<%#((GridView)Container.NamingContainer).PageCount  %>"></asp:Label>页
                        <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page" Visible="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>" ForeColor="Blue">首页</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev" CommandName="Page" Visible="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>" ForeColor="Blue">上一页</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page" Visible="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>" ForeColor="Blue">下一页</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page" Visible="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>" ForeColor="Blue">尾页</asp:LinkButton>
                        <asp:TextBox ID="Tb_page" runat="server" Width="25px" Height="15px" text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>' /><input type="button" value=" Go " onclick="javascript:var o=this.previousSibling;if(/^\d+$/.test(o.value)){__doPostBack('<%# ((GridView)Container.Parent.Parent).UniqueID %>','Page$'+o.value);}else{alert('页码必须为数字！');return false;}" >
                        <br /><br />
                    </PagerTemplate>
                    
                    
                    <FooterStyle CssClass="FooterStyle" />
                    <RowStyle CssClass="RowStyle" />
                    <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                    <%--<PagerStyle CssClass="PagerStyle" />--%>
                    <SelectedRowStyle CssClass="SelectedRowStyle" />
                    <HeaderStyle CssClass="HeaderStyle" />
                    <EditRowStyle CssClass="EditRowStyle" />
                    <AlternatingRowStyle CssClass="AltRowStyle" />
                </asp:GridView>
            &nbsp;
            <br />
            &nbsp;审核：<br />
                
                <asp:GridView ID="gvadmissibilityshow" runat="server" AutoGenerateColumns="False"
                    CssClass="GridViewStyle" OnRowCommand="gvadmissibilityshow_RowCommand"
                    OnRowDataBound="gvadmissibilityshow_RowDataBound" Width="100%">
                    <Columns>                    
                       <asp:TemplateField HeaderText="受理编号">
                            <ItemTemplate>
                             <%#Eval("adm_noid")%>   长编号：<%#Eval("applongid")%>
                            </ItemTemplate>
                            <ItemStyle Width="30%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="详情">
                            <ItemTemplate>
                                申请人：<%#Eval("applyname")%>
                            </ItemTemplate>
                            <ItemStyle Width="20%" />
                        </asp:TemplateField>
                         <asp:TemplateField HeaderText="年月">
                            <ItemTemplate>
                             <%#Eval("EffectDate")%></ItemTemplate>
                            <ItemStyle Width="10%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:HyperLink ID="hlkadd" runat="server" Target="_blank"  NavigateUrl='<%#Convert.ToInt32(Eval("adm_applyed").ToString())==0? "../StreetCenter/AddApply.aspx?id="+Eval("adm_noid"):"../StreetCenter/AddApply.aspx?applyid="+Eval("id")+"&thetype=view"%>' Font-Size="14px"><%#Convert.ToInt32(Eval("adm_applyed").ToString())==0?"填写申请表":"查看申请表"%></asp:HyperLink>
                              <asp:LinkButton ID="lkbtnpass" runat="server" CommandArgument='<%#Eval("adm_noid") %>' CommandName="pass" Font-Size="14px">通过</asp:LinkButton>
                                <asp:LinkButton ID="lkbtnunpass" runat="server" CommandArgument='<%#Eval("adm_noid") %>'    CommandName="unpass" Font-Size="14px">否决</asp:LinkButton>
                              
                            </ItemTemplate>
                            <ItemStyle Width="40%" />
                        </asp:TemplateField> </Columns>
                    
                    
                    <FooterStyle CssClass="FooterStyle" />
                    <RowStyle CssClass="RowStyle" />
                    <EmptyDataRowStyle CssClass="EmptyRowStyle" Font-Size="15px" ForeColor="Red" />
                    <PagerStyle CssClass="PagerStyle" />
                    <SelectedRowStyle CssClass="SelectedRowStyle" />
                    <HeaderStyle CssClass="HeaderStyle" />
                    <EditRowStyle CssClass="EditRowStyle" />
                    <AlternatingRowStyle CssClass="AltRowStyle" />
                </asp:GridView>
        </td>
    </tr>
</table>
